import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import store from './store/index.js'
//避免了对当前位置的冗余导航，即解决重复点击报错的问题
const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)}

import router from './router/index.js'
//按需引入
import {Tabs,TabPane,Input,Button,Row, Progress} from 'element-ui';


//关闭vue的生产提示
Vue.config.productionTip = false

Vue.use(VueRouter)
Vue.component('el-tabs', Tabs);
Vue.component('el-tab-pane', TabPane);
Vue.component('el-input', Input);
Vue.component('el-button', Button);
Vue.component('el-row', Row);
Vue.component('el-progress', Progress);

//创建vue
new Vue({
  el:'#app',
  render: h => h(App),
  store,
  router
})
